from rest_framework import serializers
from goods.models import SKU, GoodsCategory


class SKUSerializer(serializers.ModelSerializer):
    class Meta:
        # 指定模型类
        model = SKU
        # 指定字段
        fields = '__all__'


class GoodsCategorySerializer(serializers.ModelSerializer):
    class Meta:
        # 指定模型类
        model = GoodsCategory
        # 指定字段
        fields = '__all__'
